/*
 * Created on Dec 21, 2004
 */
package org.vectrics.recruiter.user.resume.email;

import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionException;
import org.vectrics.batch.VectricsQuartzJob;
import org.vectrics.domain.Domain;
import org.vectrics.hibernate.ApplicationContext;
import org.vectrics.recruiter.config.RecruitConfig;

/**
 * @author MMoore
 */
public class EmailedResumesBatchRun extends VectricsQuartzJob implements Job {
	private transient final Logger log = Logger.getLogger(EmailedResumesBatchRun.class);
	
	public EmailedResumesBatchRun() {
	}

	public String getName() {
		return("Emailed Resumes Batch Job");
	}

	public void doExecute(Domain domain, ApplicationContext arg0) throws JobExecutionException {
		if (log.isDebugEnabled())
			log.debug("Running batch job: Emailed resume processing batch for Domain = " + domain);
		EmailedResumesBatchRunnable runnable = new EmailedResumesBatchRunnable(domain, RecruitConfig.getRecruitInstance().getFromMailConfiguration(domain));
		runnable.run();
	}

}
